<template>
    <div class="aside-right">
        <ul>
            <li>
                <a href="javascript:void(0);">
                    <img src="../assets/icon/aside/me.png" alt="">
                    <span>商家中心</span>
                </a>
            </li>
            <li>
                <a href="javascript:void(0);">
                    <img src="../assets/icon/aside/me.png" alt="">
                    <span>在线客服</span>
                </a>
                <div class="u-model">
                    <h1>商家客服</h1>
                    <div class="work">
                        <h2>工作时间</h2>
                        <p>上午 9:00 - 12:00</p>
                        <p>下午13:30 - 17:30</p>
                    </div>
                    <div class="call">
                        <h2>咨询QQ</h2>
                        <p>123456789</p>
                    </div>
                    <img src="../assets/icon/aside/jiantou.png" alt="">
                </div>
            </li>
            <li>
                <a href="javascript:void(0);">
                    <img src="../assets/icon/aside/me.png" alt="">
                    <span>商家中心</span>
                </a>
            </li>
            <li>
                <a href="javascript:void(0);">
                    <img src="../assets/icon/aside/me.png" alt="">
                    <span>商家中心</span>
                </a>
            </li>
        </ul>

        <div class="top">
            <img src="../assets/icon/aside/top.png" alt="" @click="toTarget(4)">
        </div>

    </div>
</template>

<script>
    export default {
        name: "Aside",
        methods: {
            toTarget(index) {
                this.$emit("toCatalogueList", index)
            }
        }
    }
</script>

<style scoped lang="less">
.aside-right {
    width: 50px;
    height: 100%;
    background-color: #000;
    color: white;

    position: fixed;
    top: 0;
    right: 0;
    z-index: 3;

    ul {
        width: 50px;

        li {
            width: 100%;
            height: 103px;
            margin: 0 auto;

            a {
                color: white;
                text-decoration: none;

                display: flex;
                flex-direction: column;
                align-items: center;
                width: 100%;
                padding-top: 20px;
                text-align: center;
                &:hover {
                    text-decoration: none;
                }
                img {
                    display: block;
                    width: 20px;
                    height: 23px;
                    margin-bottom: 2px;
                }
                span {
                    display: block;
                    width: 60%;
                    padding-bottom: 17px;
                    border-bottom: 1px solid #333;
                }
            }

            &:first-of-type {
                margin-top: 65px;
            }

            &:nth-child(2) {
                &:hover .u-model {
                    display: block;
                }
            }

            &:hover {
                background-color: #f01277;
            }
        }


    }

    .top {
        position: absolute;
        left: 10px;
        bottom: 30px;
        &:hover {
            cursor: pointer;
        }
    }

    .u-model {
        position: absolute;
        top: 105px;
        right: 50px;
        width: 250px;
        color: #fff;
        background-color: #000;
        display: none;

        img {
            position: absolute;
            right: 0;
            top: 38%;
        }
        >h1 {
            padding-left: 30px;
            height: 30px;
            line-height: 30px;
            background: #F01277;
            font-size: 14px;
            margin: 0;
        }

        .work,.call {
            padding-left: 30px;
            margin-bottom: 50px;

            h2 {
                font-size: 14px;
            }

            p {
                font-size: 12px;
                color: #ccc;
            }
        }

    }
}
</style>
